package com.example.interface_android;

import java.text.ParseException;
import java.util.List;

import com.lsc.clientfacade.ClientFacade;
import com.lsc.clientfacade.SessionNotLoggedInException;
import com.lsc.model.phase;
import com.lsc.model.produit;

import android.os.Bundle;
import android.app.Activity;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.widget.EditText;
import android.support.v4.app.NavUtils;

public class Notice_Activity extends Activity {

    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_notice);
    }

    @Override
    public boolean onCreateOptionsMenu(Menu menu) {
        getMenuInflater().inflate(R.menu.activity_notice, menu);
        return true;
    }
    
    public void affichenotice(View view) throws SessionNotLoggedInException, ParseException
    {
    	ClientFacade f=new ClientFacade();
    	EditText et=(EditText)findViewById(R.id.notice);
    	EditText etid=(EditText)findViewById(R.id.idprod);
    	String saisie=etid.getText().toString();
    	List<phase> lf=f.getPhasesParProduit(saisie);
		for (phase ph:lf)
		{
			et.setText(ph.toString());
		}
    		

    	
    }
    
}
